using System.Security.Cryptography;
using System.Text;

static internal class MD5Helper
{
    public static byte[] GetHashFromString(string password)
    {
        MD5CryptoServiceProvider md5Hasher = new MD5CryptoServiceProvider();
        byte[] hashedBytes;
        UTF8Encoding encoder = new UTF8Encoding();
        hashedBytes = md5Hasher.ComputeHash(encoder.GetBytes(password));
        return hashedBytes;
    }
}